﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2004A.Shopping.DTO
{
    /// <summary>
    /// API统一返回值
    /// </summary>
    public class ResponseResultDto
    {
        public ResponseResultStatueCode Code { get; set; } = ResponseResultStatueCode.操作成功;
        public string Message { get; set; } = ResponseResultStatueCode.操作成功.ToString();

        //返回的值 ，我们不知道具体某个方法是什么数据类型
        //T
        //object
        //dynamic
        public dynamic Data { get; set; }
    }

    //针对分页数
    public class ResponseResultPagedDto
    {
        public dynamic Item { get; set; }
        public int Total { get; set; }
    }

    public enum ResponseResultStatueCode
    {
        操作成功  = 200,
        操作失败 = 500,
    }
}
